package com.ruoyi.jihuo.service.impl;

import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.jihuo.domain.JhSysTrafficRecord;
import com.ruoyi.jihuo.domain.TrafficCount;
import com.ruoyi.jihuo.mapper.JhReportMapper;
import com.ruoyi.jihuo.service.IJhReportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;

/**
 * 发布天猫任务Service业务层处理
 *
 * @author ruoyi
 * @date 2025-03-27
 */
@Service
public class JhReportServiceImpl implements IJhReportService {
    @Autowired
    private JhReportMapper jhReportMapper;

    @Override
    public List<TrafficCount> trafficDaily() {
        return jhReportMapper.trafficDaily(SecurityUtils.getUserId());
    }

    @Override
    public List<TrafficCount> trafficWeekly() {
        return jhReportMapper.trafficWeekly(SecurityUtils.getUserId());
    }

    @Override
    public List<TrafficCount> trafficMonthly() {
        return jhReportMapper.trafficMonthly(SecurityUtils.getUserId());
    }

    @Override
    public List<TrafficCount> getTodayTraffic() {
        return jhReportMapper.getTodayTraffic(SecurityUtils.getUserId());
    }

    @Override
    public List<TrafficCount> getThisWeekTraffic() {
        return jhReportMapper.getThisWeekTraffic(SecurityUtils.getUserId());
    }

    @Override
    public List<TrafficCount> getThisMonthTraffic() {
        return jhReportMapper.getThisMonthTraffic(SecurityUtils.getUserId());
    }

    @Override
    public List<JhSysTrafficRecord> getTodaySales() {
        return jhReportMapper.getTodaySales();
    }

    @Override
    public List<JhSysTrafficRecord> getThisWeekSales() {
        return jhReportMapper.getThisWeekSales();
    }

    @Override
    public List<JhSysTrafficRecord> getThisMonthSales() {
        return jhReportMapper.getThisMonthSales();
    }

}
